module module_example_02_mod

  implicit none

  private

  public my_print

  interface my_print
    module procedure my_print_i4
    module procedure my_print_r4
    module procedure my_print_r8
  end interface

contains

  subroutine my_print_i4(x)

    integer(4), intent(in) :: x

    write(*, *) x

  end subroutine my_print_i4

  subroutine my_print_r4(x)

    real(4), intent(in) :: x

    write(*, *) x

  end subroutine my_print_r4

  subroutine my_print_r8(x)

    real(8), intent(in) :: x

    write(*, *) x

  end subroutine my_print_r8

end module module_example_02_mod

program module_example_02

  use module_example_02_mod

  call my_print(1)
  call my_print(1.4)
  call my_print(1.4d0)

end program module_example_02
